package com.zxp00.JavaBasics;

public class Z05_Method {
    public static int sum(int a,int b){
        int c =a + b;
        return c;
    }

    /*方法重载*/
    public static int sum(int a,int b,int d){
        int s=a+b+d;
        return s;
    }

    public static void main(String[] args) {
        sum(4,5);         // 直接调用有返回值的方法，输出为空

        int s=sum(4,5);
        System.out.println(s);

        int x=sum(4,5,6);
        System.out.println(x);
    }
}
